// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.sys.entity.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * StockOutRawMaterial
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "stock_out", autoResultMap = true)
@Schema(title = "原材料出库单")
public class StockOutRawMaterial implements Serializable {

  /**
   * 出库单号
   */
  @TableField(value = "`order_sn`")
  @Schema(title = "出库单号")
  private String orderSn;

  /**
   * 出库仓库
   */
  @TableField(value = "`warehouse`")
  @JoinField(Warehouse.class)
  @Schema(title = "出库仓库")
  private Long warehouse;

  /**
   * 出库类型
   */
  @TableField(value = "`type`")
  @Schema(title = "出库类型")
  private String type;

  /**
   * 目标仓库
   */
  @TableField(value = "`to_warehouse`")
  @JoinField(Warehouse.class)
  @Schema(title = "目标仓库")
  private Long toWarehouse;

  /**
   * 出库时间
   */
  @TableField(value = "`out_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "出库时间")
  private java.util.Date outTime;

  /**
   * 单据状态 (0 - 待提交; 1 - 待出库; 2 - 已完成; 3 - 已撤销; )
   */
  @TableField(value = "`document_status`")
  @Schema(title = "单据状态")
  private String documentStatus;

  /**
   * 源表ID
   */
  @TableField(value = "`parent_id`")
  @Schema(title = "源表ID")
  private String parentId;

  /**
   * 金额
   */
  @TableField(value = "`total_amount`")
  @Schema(title = "金额")
  private String totalAmount;

  /**
   * 数量
   */
  @TableField(value = "`total_num`")
  @Schema(title = "数量")
  private String totalNum;

  /**
   * 组织
   */
  @TableField(value = "`dept`")
  @JoinField(SysDepartment.class)
  @Schema(title = "组织")
  private Long dept;

  /**
   * 客户
   */
  @TableField(value = "`customer`")
  @JoinField(ShopInfo.class)
  @Schema(title = "客户")
  private Long customer;

  /**
   * 产品类型 (0 - 原材料; 1 - 成品; )
   */
  @TableField(value = "`product_type`")
  @Schema(title = "产品类型")
  private String productType;

  /**
   * 状态
   */
  @TableField(value = "`status`")
  @Schema(title = "状态")
  private String status;

  /**
   * 备注
   */
  @TableField(value = "`remark`")
  @Schema(title = "备注")
  private String remark;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 添加类型
   */
  @TableField(value = "`add_type`")
  @Schema(title = "添加类型")
  private String addType;

  /**
   * 审批状态 (10 - 待提交; 30 - 待出库; 40 - 已完成; 50 - 已撤销; 121 - 待审批; 122 - 已驳回; )
   */
  @TableField(value = "`a_status`")
  @Schema(title = "审批状态")
  private String aStatus;

  /**
   * 退货单id借用字段
   */
  @TableField(value = "`r_id`")
  @Schema(title = "退货单id借用字段")
  private Long rId;

  /**
   * 结算组织
   */
  @TableField(value = "`need_org`")
  @JoinField(DbOrganization.class)
  @Schema(title = "结算组织")
  private Long needOrg;
}
